        var OAUTHURL    =   'https://accounts.google.com/o/oauth2/auth?';
        var VALIDURL    =   'https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=';
        var SCOPE       =   'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.google.com/calendar/feeds/default/allcalendars/full';
        var CLIENTID    =   '302180274611.apps.googleusercontent.com';
        var REDIRECT    =   'https://sites.google.com/a/magellantutoring.com/magellan-tutoring/our-tutors/tutor-page'
        var TYPE        =   'token';
        var _url        =   OAUTHURL + 'scope=' + SCOPE + '&client_id=' + CLIENTID + '&redirect_uri=' + REDIRECT + '&response_type=' + TYPE +'&hd=magellantutoring.com';
        function login() {
            var win         =   window.open(_url, "windowname1", 'width=1000, height=800, scrollbars=yes, resizable=yes');
            var pollTimer   =   window.setInterval(function() {
                console.log(win);
                console.log(win.document);
                console.log(win.document.URL);
                if (win.document.URL.indexOf(REDIRECT) != -1) {
                    window.clearInterval(pollTimer);
                    var url =   win.document.URL;
                    win.close();
                }
            }, 500);
        }
